package com.juc.phaser.phaser6;

import java.util.concurrent.Phaser;

public class Run {

	/**
	 * getRegisteredParties() 获得注册的parties 数量
	 * 每执行一次方法register()就动态添加一个parties值
	 */
	
	public static void main(String[] args) {
		Phaser phaser = new Phaser(5);
		System.out.println(phaser.getRegisteredParties());
		phaser.register();
		System.out.println(phaser.getRegisteredParties());
		phaser.register();
		System.out.println(phaser.getRegisteredParties());
		phaser.register();
		System.out.println(phaser.getRegisteredParties());
		phaser.register();
		System.out.println(phaser.getRegisteredParties());
		
	}
}
